﻿<%@ Page Title="Home Page" Language="vb" MasterPageFile="~/Site.Master" AutoEventWireup="false"
    CodeBehind="Default.aspx.vb" Inherits="WebApplication1._Default" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <p>
        <br />
        <asp:GridView ID="GridView1" runat="server" AllowSorting="True" 
            AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="carsdb">
            <Columns>
                <asp:HyperLinkField DataNavigateUrlFields="InfoUrl" 
                    DataNavigateUrlFormatString="{0}" DataTextField="ModuleName" 
                    HeaderText="ModuleName" />
                <asp:BoundField DataField="ModuleYear" HeaderText="ModuleYear" 
                    SortExpression="ModuleYear" />
                <asp:BoundField DataField="CC" HeaderText="CC" SortExpression="CC" />
                <asp:BoundField DataField="Make" HeaderText="Make" SortExpression="Make" />
                <asp:BoundField DataField="Condition" HeaderText="Condition" 
                    SortExpression="Condition" />
                <asp:BoundField DataField="Color" HeaderText="Color" SortExpression="Color" />
                <asp:BoundField DataField="Registration" HeaderText="Registration" 
                    SortExpression="Registration" />
                <asp:BoundField DataField="Price" HeaderText="Price" SortExpression="Price" />
                <asp:BoundField DataField="ContactNuber" HeaderText="ContactNuber" 
                    SortExpression="ContactNuber" />
                <asp:ImageField DataImageUrlField="Picture" HeaderText="Picture">
                    <ControlStyle Height="200px" Width="200px" />
                </asp:ImageField>
                <asp:HyperLinkField DataNavigateUrlFields="SelerPostcode" 
                    DataNavigateUrlFormatString="http://maps.google.co.uk/maps?q={0}" 
                    DataTextField="SelerPostcode" HeaderText="Location" />
                <asp:HyperLinkField DataNavigateUrlFields="ID" 
                    DataNavigateUrlFormatString="details.aspx/?ID={0}" HeaderText="Details" 
                    Text="Details" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="carsdb" runat="server" 
            ConnectionString="<%$ ConnectionStrings:carConn %>" 
            ProviderName="<%$ ConnectionStrings:carConn.ProviderName %>" 
            SelectCommand="SELECT * FROM [Car]"></asp:SqlDataSource>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
</asp:Content>
